<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
  String _id=request.getParameter("_");
%>
<style>
  .td-ul {
    overflow: auto;
    height: 300px;
    width: 420px;
    border: 1px solid #ccc;
  }
  .td-li{
    padding: 0px 15px;
    adding: 0px 15px;
    border-left: 0;
    border-right: 0;
  }
  .pull-right-fix{
    margin-right: 5px;
  }

  label input[type=checkbox].checkbox:checked + span{
    font-weight: 700;
  }
</style>
<div>
  <input type="hidden" name="keyId" id="userId1" value="${keyId}">
<fieldset>
  <legend>
    <span class="label  label-primary "> [请选择部门岗位信息，只做添加操作]</span>
  </legend>
  <table>
    <tr>
      <td>
        <ul class="list-group td-ul" id="ajax_users_config_depart">
          <c:forEach items="${departArrayList}" varStatus="i" var="list" >
            <li id="${list.departId}" class="list-group-item td-li">
              <div class="checkbox">
                <label>
                  <input id="${list.departId}" type="checkbox" class="checkbox style-0" ${list.checked}>
                  <span>${list.departName}</span>
                </label>
              </div>
            </li>
          </c:forEach>
        </ul>
      </td>
      <td>
        <ul class="list-group td-ul" id="ajax_users_config_post">
          <c:forEach items="${postArrayList}" varStatus="i" var="list" >
            <li class='list-group-item td-li' id="${list.id}">
              <div class='checkbox'>
                <label>
                  <input id="${list.id}" type='checkbox' class='checkbox style-0' ${list.checked}>
                  <span id="${list.name}">${list.name}</span>
                </label>
              </div>
            </li>
          </c:forEach>

        </ul>

      </td>
    </tr>
  </table>
</fieldset>
</div>

<script>

  var actionUrl = "<%=path%>/main/member/configPost";
  var keyId = $("input#userId1").val();
  multList("ajax_users_config_depart","ajax_users_config_post",actionUrl);



  function fn_member_configView() {

    var actionUrl = "<%=path%>/main/member/config";
    var rowData = getRowIds("ajax_users_config_post");
    var data={rowIds:rowData,keyId:keyId};
    __ajax_post(actionUrl, data, function(pdata) {
      __toastr_success(pdata.message);
      $("#member_table").jqGrid().setGridParam({datatype:'json'}).trigger("reloadGrid");
    });


  }
</script>